package be.felnederlands.client.content;

import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;

import be.felnederlands.client.content.home.HomeContent;
import be.felnederlands.client.content.newword.NewWordContent;
import be.felnederlands.client.navigation.NavigationListener;
import be.felnederlands.client.navigation.NavigationPanel.NavigationElement;

public class ContentProvider implements NavigationListener {

	@Override
	public void navigateTo(NavigationElement navigationElement) {
	//	RootPanel.get("inhoud").add(new Label(RootPanel.get("inhoud").getWidgetCount()+""));
		RootPanel.get("inhoud").clear();
		if (navigationElement == NavigationElement.HOME){
			RootPanel.get("inhoud").add(new HomeContent());
		}
		if (navigationElement == NavigationElement.NEWWORD){
			RootPanel.get("inhoud").add(new NewWordContent());
		}
	}

}
